package com.itqf.Controller;

import com.itqf.Service.Topic.TopicService;
import com.itqf.entity.Topic;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

@Controller
public class TopicDetailController {
    @Resource
    private TopicService topicService;

    //通过商品id查找某个商品的详细信息
    @RequestMapping(value = "/topdetail",method = RequestMethod.GET)
    @ResponseBody
    public Topic getTopicbytopid(int topicId)
    {
       Topic topic=topicService.getTopicbytopid(topicId);
       return topic;
    }

}
